﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>增加外出请假登记</title>
    <link href="${request.contextPath}/static/js/laypage/skin/laypage.css" rel="stylesheet" type="text/css"/>
    <link href="${request.contextPath}/static/css/layout.css" rel="stylesheet" type="text/css"/>
    <link href="${request.contextPath}/static/css/cb.css" rel="stylesheet" type="text/css"/>
    <link href="${request.contextPath}/static/css/n.css" rel="stylesheet" type="text/css"/>
    <link rel="${request.contextPath}/stylesheet" type="text/css"
          href="${request.contextPath}/static/easyui/themes/default/easyui.css"/>  <!--孙瑞豪  此处rel格式可能有问题-->
    <link rel="stylesheet" type="text/css" href="${request.contextPath}/static/easyui/themes/icon.css"/>
    <link rel="stylesheet" type="text/css" href="${request.contextPath}/static/easyui/demo/demo.css"/>

    <script type="text/javascript" src="${request.contextPath}/static/easyui/jquery.min.js"></script>
    <script type="text/javascript" src="${request.contextPath}/static/easyui/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="${request.contextPath}/static/laydate/laydate.js"></script>
    <script type="text/javascript" src="${request.contextPath}/static/js/vue/vue.min.js"></script>
    <script type="text/javascript" src="${request.contextPath}/static/js/laypage/laypage.js"></script>
</head>
<body>
<!-- 增加外出请假条记录弹出框 -->

<table width="100%" border="1" cellspacing="1" cellpadding="3">
    <tr style="height: 30px">
        <td align="center"><strong>矫正单位:</strong></td>
        <td align="left">
            <intput name="unitchoice"
                    value="请选择矫正单位" style="width: 178px; height: 30px" id="jid"/>
        </td>
        <td align="center"><strong>姓名:</strong></td>
        <td align="center"><input name="namechoice"
                                  value="请选择服刑人员" style="width: 178px; height: 30px" id="pid"/>
        </td>
        <td align="center"><strong>请假日期:</strong></td>
        <td width="10%" align="left">
            <input placeholder="请选择日期" style="width: 178px; height: 30px"
                   class="laydate-icon" onclick="laydate()" id="leavedate"/></td>
    </tr>
    <tr>
        <td align="center"><strong>目的地:</strong></td>
        <td colspan="5" align="left"><input type="text" id="bourn"/>
        </td>
    </tr>
    <tr>
        <td align="center"><strong>外出理由:</strong></td>
        <td colspan="5"><input type="text" id="reason"/></td>
    </tr>
    <tr>
        <td align="center"><strong>被访对象:</strong></td>
        <td align="left"><input type="text" id="target"/>
        </td>
        <td align="center"><strong>对象关系:</strong></td>
        <td align="left"><input type="text" id="relation"/>
        </td>
        <td align="center"><strong>政治面貌:</strong></td>
        <td align="left">
            <select  id="zz_status">
                <option value="团员">团员</option>
                <option value="党员">党员</option>
                <option value="群众">群众</option>
            </select>
        </td>
        </td>
    </tr>
    <tr>
        <td align="center"><strong>工作单位:</strong></td>
        <td colspan="5"><input type="text" id="org"/></td>
    </tr>
    <tr>
        <td align="center"><strong>家庭地址:</strong></td>
        <td colspan="5"><input type="text" id="address"/></td>
    </tr>
    <tr>
        <td align="center"><strong>起始日期:</strong></td>
        <td align="left"><input
                placeholder="请选择日期" style="width: 150px; height: 30px"
                class="laydate-icon" onclick="laydate()" id="startdates"/></td>
        <td align="center"><strong>截止日期:</strong></td>
        <td align="left"><input
                placeholder="请选择日期" style="width: 150px; height: 30px"
                class="laydate-icon" onclick="laydate()" id="enddates"/></td>

        <td align="right"><strong>请假区域:</strong></td>
        <td align="left">
            <input type="text" id="location"/>
        </td>
    </tr>
    <tr>
        <td align="center"><strong>备&nbsp;&nbsp;&nbsp;&nbsp;注:</strong></td>
        <td colspan="5"><textarea rows="2" cols="70" id="remark"></textarea></td>
    </tr>
    <tr></tr>
</table>

<script type="text/javascript">

    //显示司法所，监管等级和矫正人员下拉框
    var getList = function () {
        $('#jid').combobox({
            dataType: "json",
            url: '${request.contextPath}/grade/jselect',
            valueField: 'id',
            textField: 'name',
            //当司法所发生变化时，相应的矫正人员也随之发生变化
            onSelect: function (rec) {
                $("#pid").combobox('clear');
                $("#pid").combobox('reload', '${request.contextPath}/grade/pselect?jid=' + rec.id);
            },
            //当数据加载成功后，给司法所下拉框赋予初始值
            onLoadSuccess: function () {
                $("#jid").combobox("setValue", "请选择矫正单位");
            }
        });
        //当数据加载成功后，给矫正人员下拉框赋予初始值
        $('#pid').combobox({
            dataType: "json",
            url: '${request.contextPath}/grade/pselect',
            valueField: 'id',
            textField: 'name',
            onLoadSuccess: function () {
                $("#pid").combobox("setValue", "请选择矫正人");
            }
        });
    };
    //刚开始显示所有的司法所和所有矫正人员
    getList();
</script>
</body>
</html>